<template slot="search">
  <div>
    <el-form-item label="商品名称">
      <el-input
        size="mini"
        :clearable="true"
        v-model="params.goodName"
        placeholder="商品名称"
      ></el-input>
    </el-form-item>

    <el-form-item label="商品类型">
      <el-select size="mini" v-model="params.typeNo" placeholder="请选择">
        <el-option
          v-for="item in goodsTypes"
          :key="item.typeNo"
          :label="item.name"
          :value="item.typeNo">
        </el-option>
      </el-select>
    </el-form-item>

    <el-form-item label="物流状态">
      <el-select size="mini" v-model="params.expressStatus" placeholder="请选择">
        <el-option
          v-for="item in expressStatus"
          :key="item.value"
          :label="item.name"
          :value="item.value">
        </el-option>
      </el-select>
    </el-form-item>
  </div>
</template>
<script>
export default {
  data() {
    return {
      params: {
        goodName: "",
        typeNo: "",
        expressStatus: "",
      },
      expressStatus: [{
        name: '全部',
        value: '',
      },
        {
          name: '待发货',
          value: 'NO_SEND',
        },{
          name: '运输中',
          value: 'DOING',
        },{
          name: '已送达',
          value: 'SEND_TO',
        },{
          name: '取消',
          value: 'CANCEL',
        },
        ],
      goodsTypes: [{
        name: '全部',
        typeNo: '',
      }]
    };
  }
  , created() {
    this.$get("/goods/goodsType", {}).then(res => {
      if (res.R) {
        res.data.forEach(e => {
          this.goodsTypes.push(e);
        })
      }
    })
  }
};
</script>
<style scoped>
</style>
